package utils

import "strings"

// 字符串数组是否包含target
func In(target string, str_array []string) bool {
	for _, element := range str_array {
		if target == element {
			return true
		}
	}
	return false
}

// target 是否包含 字符串数组项为后缀
func HasFileType(target string, str_array []string) bool {
	for _, element := range str_array {
		if strings.HasSuffix(target, element) {
			return true
		}
	}
	return false
}
